/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package proyectocallcentergrupo6;
import java.sql.*;
public class Conectar {
    
    static String bd = "CallCenter";
    static String usuario = "Usuario";
    static String password = "clave";
    static String url = "jdbc:derby://localhost:1527/" + bd;
    Connection conn = null;
    
    public Conectar(){
        try{
            Class.forName("org.apache.derby.jdbc.ClientDriver");
            conn = DriverManager.getConnection(url,usuario, password);
            if(conn != null){
            }
            
        }catch(SQLException e){
            System.out.println(e);
        }catch(ClassNotFoundException e){
            System.out.println(e);
        }
    }
    
    public Connection getConnection(){
        return conn;
    }

    public void desconectar(){
        conn = null;
    }
    
    
}
